<template>
	<view class="goodsPane">
		<view class="paneHeader">
			<text class="title">热销第一名</text>
			<text class="title"></text>
			<view class="more" @click="navItemClick()"><text>查看更多</text>
				<uniIcon type="arrowright" size="18"></uniIcon>
			</view>
		</view>
		<!-- <navigator url="/pages/goodsdetails/goodsdetails">实现跳转</navigator> -->
		<view class="paneBody" @click="navigateTo">
			<view class="goodsWrapper">
				<view class="imageWrapper">
					<image class="image" src="https://img11.360buyimg.com/n7/jfs/t1/86289/23/15511/251953/5e723b96Ed2f480eb/9845c5e15f40ec6b.jpg"></image>
				</view>
				<view class="goodsInfo">
					<view class="title">Apple iPad Pro 11英寸平板电脑 2020年新款(128G WLAN版/全面屏/A12Z/Face ID/MY232CH/A) 深空灰色</view>
					<view class="countNum">销量20万+</view>
					<view class="price">
						<text class="p1">&yen;6229.00</text>
						<text class="p2">&yen;6800.00</text>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		methods: {
			navItemClick() {
				uni.navigateTo({
					url: '/pages/goodsdetails/goodsdetails'
				})
			},
			navigateTo() {
				uni.navigateTo({
					url: '/pages/ipad/ipad'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.goodsPane {
		background: #fef2ec;
		margin: 0 20rpx;
		margin-top: 15rpx;
		border-radius: 30rpx;
		margin-bottom: 15rpx;

		.paneHeader {
			line-height: 60rpx;
			display: flex;
			justify-content: space-between;
			padding: 20rpx 40rpx;

			.title {
				font-size: 42rpx;
				font-weight: 600;
			}

			.more {
				font-size: 28rpx;
				color: #808080;
				font-weight: 550;
			}
		}

		.paneBody {
			padding: 20rpx 20rpx;

			.goodsWrapper {
				padding: 10rpx;
				width: 100%;
				background: white;
				display: flex;
				border-radius: 20rpx;
				flex-direction: row;
				box-sizing: border-box;

				.imageWrapper {
					width: 180rpx;
					height: 180rpx;
					overflow: hidden;

					.image {
						width: 100%;
						height: 100%;
					}
				}

				.goodsInfo {
					padding-left: 20rpx;
					display: flex;
					flex: 1;
					flex-direction: column;

					.title {
						color: #333;
						overflow: hidden;
						text-overflow: ellipsis;
						display: -webkit-box;
						-webkit-line-clamp: 2;
						-webkit-box-orient: vertical;
						font-size: 26rpx;
						font-weight: 600;
						box-sizing: border-box;
					}

					.countNum {
						font-size: 24rpx;
						color: #999999;
					}

					.price {
						.p1 {
							color: red;
							font-size: 32rpx;
						}

						.p2 {
							color: #999999;
							font-size: 24rpx;
							margin-left: 20rpx;
							text-decoration: line-through;
						}
					}
				}
			}

		}
	}
</style>
